
var myName = `aaa`

var getName  = function(){
    return 'javascript'
};

console.log(name)
console.log(`<div>
    <span>${myName}</span>
    <span>${getName}</span>
</div>`)

function test (template: any, name: any, age: any) {
    console.log(template);
    console.log(name);
    console.log(age);
}

var myName = "zhang san";
var getAge = function () {
    return 18;
}

test `hello my name is ${myName},i 'm ${getAge()}`;

function demo(a: string = 'abcd', b: Number, c: any = []): void {    // void 表示函数无返回值
    console.log(a)
    console.log(b)
    console.log(c)
}

demo('efgh', 0)

// function test(a:string,b?:string,c:string="default") {
//     console.log(a);
//     console.log(b);
//     console.log(c);
//   };

function demo1(a:string, b?:number, c:string  = "default"): void {
    console.log(a)
    console.log(b)
    console.log(c)
}

demo1('asd', 123)
demo1('qwerasdfzxcv')

// yield;
function* doSomething() {
    console.log('start');
    yield ;
    console.log('end')
};
var test = doSomething();
test.next();// start
test.next();//end   
